<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>GameApp</title>
	<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
	<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:400,300,700,700italic" />
	<link type="text/css" href="importFB/friend-selector/jquery.friend.selector-1.2.1.css" rel="stylesheet" />
	<link rel="stylesheet" href="css/style.css" />
	<link rel="stylesheet" href="css/popupwindow.css" />
</head>
<script src="js/jquery-1.6.2.min.js"></script>
<div class="images span1">

</div>
<div class="well">
	<div class="pop_fix_bg_loader">
	<div class="bg_pos_ab"><img src="images/bg2.jpg"></div>
		<div class="loader_pos_ab" >
		<div class="center">
			<p style="font-size:20px;color:#000;"><b>.جار تنزيل لعبة مثيرة</b></p>
			<p style="font-size:20px;color:#000;"><b>SOMETHING EXCITING</b></p>
			<p style="font-size:35px;color:#000;"><b>LOADING</b></p>
			<p><img src="images/ajax-loader.gif"/></p>
		</div>
		</div>
	</div>
</div>
<body id="container">
	<div class="frameT">
		<div class="frameTC">
		<div class="bg_pos_ab"><img src="images/bg2.jpg"></div>
			<div class="container">
				<div class="well">
					<div class="span1 float_l">
						<a href="javascript:void(0);" onclick="openBox(1,1,8)"><img id="box-1" src="images/Ticket-PNG-Sequence_00000.png"/></a>
					</div>
					<div class="span1 float_l">
						<a href="javascript:void(0);" onclick="openBox(2,1,8)"><img id="box-2" src="images/Ticket-PNG-Sequence_00000.png"/></a>
					</div>
					<div class="span1 float_l">
						<a href="javascript:void(0);" onclick="openBox(3,1,8)"><img id="box-3" src="images/Ticket-PNG-Sequence_00000.png"/></a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="well" id="luck_message" style="display:none;">
		<div class="pop_fix_bg">
			<div class="pop_re_center pop_bg" style="margin-top:2%;">
			<div style="height:200px;overflow:auto">
				<div class="close">
					<a href="javascript:void(0);">X</a>
				</div>
				<div style="margin-bottom:3%">
				<h2 class="text_f_c_l">كن محظوظا مع تطبيق عمر</h2>
				<h2 class="text_f_c_l">جوائز يومية</h2>
				<h2 class="text_f_c_l">GET LUCKY WITH OMAR APP.</h2>
				<h2 class="text_f_c_l">WIN EXCITING PRIZES EVERYDAY.</h2>
			</div>
				<div class="span2 float_l">
					<div style="color:#000;text-align:right">
						<p style="font-size:20px"><b>:طريقة اللعب</b></p>
						<p>داخل ثلاثة مناديس العديد من المفاجأت</p>
						<p>انقر المندوس لترى مفاجأتك</p>
						<p>إذا المناديس الثلاثة تحتوي على نفس المفاجأه أنت</p>
						<p>.الفائز</p>
						<p>3فرص يومية لتفوز معنا</p>
						<p>.إذا خسرت حاول مرة أخرى غدا</p>
						<p>أدعو خمسة من أصدقائك ليشاركو.</p>
						<p>حاول حظك</p>
					</div>
				</div>
				<div class="span3 float_l mar_l" id="pop_c">
					<div style="color:#000">
						<p style="font-size:20px"><b>How to Win:</b></p>
						<p>Inside three Mandoos there waiting loads of surpises!</p>
						<p>Touch the Mandoos to find what is in for you. If your findings for all three mandoos are same then you are a Winner.</p>
						<p>You have three chances to win everyday.</p>
						<p>If loose all your chances for the day, You can try your luck next day.</p>
						<p>Or you can invite 5 Facebook friends to try another chance.</p>
						<p>Go try your luck!!</p>
					</div>
				</div><div class="clearfix"></div>
			</div>
			</div>
		</div>
	</div>
	<div class="well" id="sorry_message" style="display:none;">
		<div class="pop_fix_bg">
			<div class="pop_re_center pop_bg">
				<div class="span2 float_l">
					<div style="color:#000;text-align:right" id="message_p_arabic">
						<h2>,عتذر</h2>
						<p class="mar_b" id="sorry_message_p_arabic"></p>
					</div>
				</div>
				<div class="span3 float_l mar_l">
					<div style="color:#000" id="message_p">
						<h2>Sorry!</h2>
						<p class="mar_b" id="sorry_message_p"></p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="well" id="hurray_message" style="display:none">
		<div class="pop_fix_bg">
			<div class="pop_re_center pop_bg">
				<div class="span22 float_l">
					<div style="color:#000;text-align:right" id="hurray_p_arabic"></div>
				</div>
				<div style="width:12%;margin-left:3%" class="float_l">
					<div id="hurray_image"></div>
				</div>
				<div class="span33 float_l mar_l">
					<div style="color:#000" id="hurray_p"></div>
				</div>
			</div>
		</div>
	</div>
	<div class="well" id="sorry_message_chances" style="display:none;">
		<div class="pop_fix_bg">
			<div class="pop_re_center pop_bg">
				<div class="span2 float_l">
					<div style="color:#000;text-align:right">
						<p class="mar_b" id="sorry_message_p_chance_arabic"></p>
					</div>
				</div>
				<div class="span3 float_l mar_l">
					<div style="color:#000">
						<h2>Not so Lucky?? </h2>
						<p class="mar_b" id="sorry_message_p_chance"></p>
					</div>
				</div>
				<div class="sorry_text_f">
					<a href="javascript:void(0);" onclick="playAgaine()" class="omar_btn"><b>Play</b></a>
				</div>
			</div>
		</div>
	</div>
	<div class="well" id="sorry_message_fb" style="display:none;">
		<div class="pop_fix_bg">
			<div class="pop_re_center pop_bg">
				<div class="span2 float_l">
					<div style="color:#000;text-align:right">
						<h2>,نعتذر</h2>
						<p>لقد نفذت محاولاتك الثلاثة.</p>
						<p>حاول غدا أو أدعو 5 من اصدقائك لتحصل على </p>
						<p>فرصة أخرى</p>
					</div>
				</div>
				<div class="span3 float_l mar_l">
					<div style="color:#000">
						<h2>Sorry!</h2>
						<p>You have used your all three chances.</p>
						<p>Try tomorrow.</p>
						<p>Or invite 5 facebook friends to get another chance.</p>
					</div>
				</div>
				<div class="sorry_text_f">
					<a href="javascript:{}" class="connect"><img src="images/fb_login.png" width="150px;"/></a>
					<a href="javascript:{}" class="bt-fs-dialog omar_btn" style="display:none"><b>Invite FB Friends</b></a>
				</div>
			</div>
		</div>
	</div>
	<div class="well" id="won_box" style="display:none;">
		<div class="pop_fix_bg">
			<div class="pop_re_center pop_bg_reg">
				<div class="span4 float_l" id="reg_image_form">
					<img src="images/tickets.png"/>
				</div>
				<div class="span5 float_l mar_l table" id="pop_c">
					<table><tr><td>Name(:الاسم)</td><td><input type="text" id="userName" class="input"><span id="errorUsername" style="color:red;"></td></tr>
					<tr><td>Email(:البريد الإليكتروني)</td><td><input type="text" id="userEmail" class="input"><span id="errorEmailMessage" style="color:red;"></td></tr>
					<tr><td>Mobile no(:رقم النقال)</td><td><input type="text" id="userPhone" class="input"><span id="errorPhone" style="color:red;"></td></tr>
					<tr><td>&nbsp;</td><td><input type="button" class="input_submit" value="Submit(أرسل)" onclick="submitUserDetails()"><br/><br/><br/>
					<span id="imgLoader"></span></td></tr></table>
				</div><div class="clearfix"></div>
			</div>
		</div>
	</div>
	<!--Hidden texts for winners-->
	<p style="diaplay:none" id="win_message"></p>
	<p style="diaplay:none" id="win_message_arabic"></p>
	<p style="diaplay:none" id="win_logo"></p>
	<p style="diaplay:none" id="reg_image"></p>
	<input type="hidden" id="chance_per_day" name="chance_per_day">
	<!--End-->
</body>
</html>
<script src="js/jquery.flipbook.js"></script>
<script type="text/javascript" src="importFB/friend-selector/jquery.friend.selector-1.2.1.js"></script>
<script src="js/load.js"></script>
<script src="js/url.js"></script>
<script>
$( window ).ready(function(){
	setTimeout (function () {
		$('#luck_message').show();
		$('#hurray_message').show();
		$('#sorry_message').show();
		$('#sorry_message_fb').show();
		$('#sorry_message_chances').show();
		$('#won_box').show();
		
			$(function pop_re_center(){
			$('.pop_re_center').each(function(){
				$(this).css('left',($(window).width()-$(this).width())/ 2 + 'px');
				$(this).css('top',($(window).height()-$(this).height())/ 2 + 'px');
			});

			
			$('#luck_message').hide();
			$('#hurray_message').hide();
			$('#sorry_message').hide();
			$('#sorry_message_fb').hide();
			$('#sorry_message_chances').hide();
			$('#won_box').hide();
			
		});
	}, 8000);
	 $(".close").click(function(){
		$('#luck_message').fadeOut();
	});

});
$( window ).resize(function() {
	$(function pop_re_center(){
		$('.pop_re_center').each(function(){
			//console.log((($(window).width()-$(this).outerWidth())/ 2)+'--'+(($(window).height()-$(this).outerHeight())/ 2));
			$(this).css('left',($(window).width()-$(this).width())/ 2 + 'px');
			$(this).css('top',($(window).height()-$(this).height())/ 2 + 'px');
		});
	});
});

</script>
<script type="text/javascript">

var diamonds=1;
var knife=2;
var coins=3;
var pot=4;

var failure=0;
var success=1;
var normal=2;
var item_selcted=0;
var images1 = '';
var images2 = '';
var images3 = '';
var link="";
var path="";
var openCount=0;
var box_items=new Array();
var x = 0;

var box1_open=0;
var box2_open=0;
var box3_open=0;
</script>
<script type="text/javascript">
var selected_members_count=0;
  jQuery(document).ready(function($) {
    $(".bt-fs-dialog").fSelector({
      getStoredFriends: [518640274, 529053659],
      onSubmit: function(response){
        changeChanceStatus();
      }
    });
  });
</script>
<script src="importFB/all.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
  window.fbAsyncInit = function() {
    FB.init({
      appId  			: '622830027850825', // Facebook Application ID
      status 			: true, // check login status
      cookie 			: true, // enable cookies to allow the server to access the session
      xfbml  			: true, // parse XFBML
    });
    FB.getLoginStatus(function(response) {
      if (response.authResponse) {
        $(".connect").attr("class", "logout").text("Logout");
        $(".fs-dialog-container").show();
        $(".bt-fs-dialog").show();
        $(".logout").hide();
        $(".logout").click(function(){
          FB.logout(function(response) {
            location.reload();
          });
        });
      } else {
      }
    });
  };
  // Load the SDK Asynchronously
  (function(d){
     var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "importFB/all.js";
     d.getElementsByTagName('head')[0].appendChild(js);
   }(document));
  jQuery(document).ready(function($){
    $(".connect").click(function(){
      FB.login(function(response) {
        if (response.authResponse) {
          location.reload();
        } else {
          // User cancelled login or did not fully authorize
        }
      }, {scope: 'user_friends'});
    });
  });
checkImeiNumber();

</script>


